**************************************************************************************************************
***************** Figure 4: Prevalence of Enterprise Exemptions in Antitrust Statutes		 *****************
**************************************************************************************************************


//Panel A

use CCL_Law_Data_Ver1.dta, clear

preserve
keep if year >1949
keep if year <2011
drop if regional_group==1
drop if competition_law_coded_ever==0
drop if competition_law_in_place==0

gen soe =0
replace soe =1 if exempt_state_owned_complete ==1 |exempt_state_operated_complete==1 

tab soe if year ==1990 
tab soe if year == 2010

egen EFF = mean(soe), by(year)

egen tag = tag(year)
twoway line EFF year if tag, sort saving(exempt_soe) graphregion(color(white)) bgcolor(white) xtitle("Year") ytitle("Proportion") title("A. State Owned / Operated Enterprises") lpattern(1 _ shortdash_dot longdash) xla(1950(10)2010) yla(0(.1)1.05)



//Panel B
use CCL_Law_Data_Ver1.dta, clear

* preserve
keep if year >1949
keep if year <2011
drop if regional_group==1
drop if competition_law_coded_ever==0
drop if competition_law_in_place==0

gen exempt =0
replace exempt =1 if exempt_export_cartel_complete ==1 | exempt_des_monopolies_complete ==1 |exempt_other_complete ==1 

tab exempt if year ==1980
tab exempt if year ==1990 
tab exempt if year == 2010

egen EFF = mean(exempt), by(year)

egen tag = tag(year)
twoway line EFF year if tag, sort saving(exempt_other) graphregion(color(white)) bgcolor(white) xtitle("Year") ytitle("Proportion") title("B. Other Enterprise Categories") lpattern(1 _ shortdash_dot longdash) xla(1950(10)2010) yla(0(.1)1.05)


gr combine exempt_soe.gph exempt_other.gph


// Numbers 


use CCL_Law_Data_Ver1.dta, clear

keep if year >1949
keep if year <2011
drop if regional_group==1
drop if competition_law_coded_ever==0
drop if competition_law_in_place==0


gen combine =0
replace combine =1 if exempt_export_cartel_complete ==1 | exempt_des_monopolies_complete ==1 |exempt_other_complete ==1 |exempt_export_cartel_complete ==1 | exempt_des_monopolies_complete ==1 |exempt_other_complete ==1 

tab combine if year ==1990 
tab combine if year == 2010
